package designMode.statePattern.after;

/**
 * @author LIBOFEI
 * @ClassName SoldOutState
 * @description
 * @date 2020/6/28 16:50
 * @Version 1.0
 **/
public class SoldOutState implements State {

    GumballMachine gumballMachine;

    public SoldOutState(GumballMachine gumballMachine){
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("已售完");
    }

    @Override
    public void ejectQuarter() {
        System.out.println("糖果已售完，不能退币");
    }

    @Override
    public void turnCrank() {
        System.out.println("糖果已售完");
    }

    @Override
    public void dispense() {
        System.out.println("发生错误");
    }
}
